package com.xuanyuan.util;

import com.xuanyuan.model.Departments;
import com.xuanyuan.model.User;
import com.xuanyuan.vo.DepartmentsVo;
import com.xuanyuan.vo.UserVo;

public class Model2VoUtil {
   public static UserVo getUserVo(User user){
	   UserVo userVo = new UserVo();
	   userVo.setDepartment(user.getDepartment());
	   userVo.setEmail(user.getEmail());
	   userVo.setId(user.getId());
	   userVo.setName(user.getName());
	   userVo.setPassword(user.getPassword());
	   userVo.setPer(user.getPer());
	   userVo.setPhone(user.getPhone());
	   userVo.setUserName(user.getUserName());
	   return userVo;
   }
   
   public static DepartmentsVo getDepartmentsVo(Departments u){
	   DepartmentsVo user = new DepartmentsVo();
	   user.setId(u.getId());
	   user.setDepartmentName(u.getDepartmentName());
	   user.setPhoneNumber(u.getPhoneNumber());
	   user.setUserName(u.getUserName());
	   user.setDepartmentsId(u.getDepartmentsId());
	   user.setNo(u.getNo());
	   return user;
   }
	
}
